Skip to content

Add Support section with Buy Me a Coffee link#241

Merged
FuJacob merged 2 commits into
mainfrom
support-cotabby-section
May 25, 2026
Merged

Add Support section with Buy Me a Coffee link#241
FuJacob merged 2 commits into
mainfrom
support-cotabby-section

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 25, 2026

Summary

Adds a Support section to the settings window, positioned directly above the Updates panel, with a link to https://buymeacoffee.com/cotabby. Also restores the Buy Me a Coffee button in the README (removed in an earlier cleanup) using the new Cotabby link.

Validation

xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build
# ** BUILD SUCCEEDED **

swiftlint lint --quiet Cotabby/UI/SettingsView.swift
# exit 0

Settings change is additive (a new Link row); README change is a static button.

Linked issues

None.

Risk / rollout notes

No behavior, settings, or schema changes — purely additive UI/docs. The Buy Me a Coffee URL points at buymeacoffee.com/cotabby; confirm that page is live before merge.

Greptile Summary

This PR adds a Support section to the settings window (above the Updates panel) with a Buy Me a Coffee link, restores the corresponding badge in the README, and takes the opportunity to clean up the menu bar toggles — reordering them, renaming two labels, and moving the multi-line toggle alongside the other feature toggles.

  • SettingsView.swift: new supportSection inserted before updatesSection; uses a force-unwrapped URL(string:) literal that is safe today but fragile to future edits.
  • MenuBarView.swift: "Include Clipboard Context" moved below the app-specific toggle; "Show Indicator" → "Show Cotabby Indicator"; "Multi-line" → "Allow Multi-line Suggestions" and relocated above the engine picker.
  • README.md: additive Support section with a Buy Me a Coffee badge pointing to buymeacoffee.com/cotabby.

Confidence Score: 4/5

Safe to merge; all changes are additive UI and documentation with no behavior or schema impact.

The settings addition and README update are purely additive. The menu bar toggle reordering and renames are cosmetic. The only code-quality concern is the force-unwrapped URL literal in supportSection, which is safe with the current string but would crash immediately if the literal were ever malformed during a future edit.

No files require special attention beyond the force-unwrap on line 421 of SettingsView.swift.

Important Files Changed

Filename Overview
Cotabby/UI/SettingsView.swift Adds a new supportSection above updatesSection with a Link to buymeacoffee.com; uses a force-unwrapped URL literal which is safe today but fragile to future edits.
Cotabby/UI/MenuBarView.swift Reorders toggles (clipboard context moved below app-specific toggle), renames "Show Indicator" → "Show Cotabby Indicator" and "Multi-line" → "Allow Multi-line Suggestions", and moves the multi-line toggle up from after the length picker to alongside the other feature toggles. No logic changes.
README.md Adds a Support section with a Buy Me a Coffee badge/link pointing to buymeacoffee.com/cotabby; purely additive documentation change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    SV[SettingsView body]
    SV --> SH[settingsHeader]
    SH --> SUP[supportSection NEW]
    SUP --> LINK["Link → buymeacoffee.com/cotabby"]
    SUP --> UPD[updatesSection]
    UPD --> UNI[uninstallSection]
    UNI --> GEN[generalSection ...]

    MB[MenuBarView controlsSection]
    MB --> EG[Enable Globally]
    EG --> APP["Enable in app (conditional)"]
    APP --> CC[Include Clipboard Context MOVED]
    CC --> SCI[Show Cotabby Indicator RENAMED]
    SCI --> ML[Allow Multi-line Suggestions RENAMED+MOVED]
    ML --> ENG[Engine Picker]
    ENG --> LEN[Length Picker]
Loading

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Add Support section linking to Buy Me a ..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

FuJacob added 2 commits May 25, 2026 03:04
Move the per-app enable/disable toggle directly under "Enable Globally"
so both scope controls sit together. Rename "Show Indicator" to "Show
Cotabby Indicator" and relabel the multi-line toggle to "Allow Multi-line
Suggestions", moving it up beneath the indicator toggle next to the other
behavior switches instead of trailing the engine/model/length pickers.
Add a Support section to the settings window directly above Updates with
a link to https://buymeacoffee.com/cotabby, and restore the Buy Me a
Coffee button in the README (removed in an earlier cleanup) using the new
Cotabby link.
@FuJacob FuJacob merged commit 6ff9c30 into main May 25, 2026
3 checks passed
private var supportSection: some View {
Section("Support") {
LabeledContent {
Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby")!)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Force-unwrapping URL(string:) will crash at runtime if the literal ever becomes invalid (e.g. a typo during a future edit). Since Link requires a non-optional URL, a safe alternative is to declare it as a static constant outside the view body so the crash would surface at app launch rather than silently in a live setting — or use a no-op fallback URL.

Suggested change
Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby")!)
Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby") ?? URL(string: "https://buymeacoffee.com")!)

Fix in Codex Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant